package com.gurid.service.edu.feign.fallback;

import com.gurid.common.base.result.R;
import com.gurid.service.edu.feign.OssFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 熔断降级，假如图片删除失败，则返回R.error但是讲师还是会删除，不至于服务整个down
 */

@Service
@Slf4j
public class OssFileServiceFallback implements OssFileService {
    @Override
    public R test() {
        return R.error();
    }

    @Override
    public R delete(String url) {
        log.info("熔断保护");
        return R.error();
    }
}
